<%-- 
    Document   : header
    Created on : Apr 4, 2012, 4:34:25 PM
    Author     : louise
--%>
<%@page import="entity.User"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html>
<%
    int userLogin = 0;
    String currentUser = "";
    if ( request.getSession(false) != null ) {
    
        currentUser = (String) session.getAttribute("UserName");
        userLogin = 1;
 
    }

 
%>

<header>
    
    <div class="container">
        <h1>
            <a href="index.html">Tut-Tutoring</a>
        </h1>
        <nav>
            <ul>
                <%
                   //Only show these links if the user is signed in
                   // 0 is not a user
                   if(userLogin==0){                            
                 %>
                <li>
                    <a href="index.jsp" onclick="this.className='current'" >Home</a>
                </li>
                <li>
                    <a href="category.jsp" onclick="this.className='current'" >Category</a>
                </li>
                <li>
                    <a href="gallery.html" onclick="this.className='current'" >Gallery</a>
                </li>
                    <li>
                    <a class='inline' href="#edit_details" >Edit Details</a>
                </li>
                <% }  else { %>
                <li>
                    <a class='inline' href="#inline_content" >Login</a>
                </li>
                <li>
                    <a class='inline' href="#register" >Register</a>
                </li>                
                <% } %>
            </ul>
        </nav>
    </div>
</header>

